#!/bin/bash -e

function info() {
echo Usage: `basename $0` 'bed.prefix file_fmt_to'
exit 1
}

while getopts  ":p:f:i:d:" opt; do
case  $opt  in
    p) out_prefix=$OPTARG;;
    f) suffix=$OPTARG;;
    i) bed=$OPTARG;;
    d) depth_filter=$OPTARG;;
    *) info;;
esac
done
shift $(($OPTIND - 1))


if [ $# -lt 1 ]; then info; fi

. $var

format=$2
plink --bfile $1 --out $out_prefix.format --recode $format

. $cmd_done